import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { setupAntd } from '@/antd'
// import VueDatePicker from '@vuepic/vue-datepicker'
// import '@vuepic/vue-datepicker/dist/main.css'
// import myDatepicker from 'vue-datepicker/vue-datepicker-es6.vue'
// import echarts from "echarts"; // npm install echarts --save

if (process.env.VUE_APP_MOCK === 'true') {
    import('@/api/mock/user_info')
    import('@/api/mock/identity_info')
    import('@/api/mock/validate_username')
    import('@/api/mock/validate_email')
    import('@/api/mock/register')
    import('@/api/mock/login')
    import('@/api/mock/edit_user_profile')
    import('@/api/mock/change_password')
    import('@/api/mock/logout')
    import('@/api/mock/search')
    import('@/api/mock/author')
    import('@/api/mock/author_rec')
    import('@/api/mock/favorite')
    import('@/api/mock/favorite_rec')
    import('@/api/mock/get_favorite')
    import('@/api/mock/paper_detail')
    import('@/api/mock/similar')
    import('@/api/mock/version_info')
    import('@/api/mock/interest_author')
    import('@/api/mock/search_tag')
    import('@/api/mock/tag_info')
    import('@/api/mock/author_info')
    import('@/api/mock/interest_change')

}


const app = createApp(App)
// app.use(DatePicker)
// app.component('VueDatePicker', myDatepicker)
setupAntd(app)
app.use(store)
app.use(router)
// app.config.globalProperties.$echarts = echarts; // 将 echarts 实例挂载到全局属性中
app.mount('#app')

